<!--
 * @Author: 追逐的娃 kangchao_php@163.com
 * @Date: 2024-10-28 15:19:52
 * @LastEditors: 追逐的娃 kangchao_php@163.com
 * @LastEditTime: 2024-10-28 15:22:29
 * @FilePath: \vue-project\src\components\ExcelPreview.vue
 * @Description: 
 * 
-->
<template>
  <vue-office-excel :src="src" @rendered="renderedHandler" @error="errorHandler" />
</template>

<script setup>
//引入VueOfficeExcel组件
import VueOfficeExcel from '@vue-office/excel'
//引入相关样式
import '@vue-office/excel/lib/index.css'
const props = defineProps({
  src: {
    type: String,
    default: ''
  }
})
const renderedHandler = () => {
  console.log('渲染完成')
}
const errorHandler = () => {
  console.log('渲染失败')
}
</script>

<style lang="scss" scoped>
</style>